package com.qf.feign;

import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;

/**
 * @author 千锋教育
 * @Company http://www.mobiletrain.org/
 * @Version 1.0
 */
//@Component
@Slf4j
public class MyFallbackFactory implements FallbackFactory<GoodsFeign> {

//    @Autowired
    MyFallback myFallback;

    @Override
    public GoodsFeign create(Throwable cause) {
        log.info("原因：" + cause.getMessage());
        cause.printStackTrace();
        return myFallback;
    }
}
